<div>

    <h2 translate="swanApp.session.home.title">Sessions</h2>

    <div class="container">
        <div class="row">
            <div class="col-md-4">
                <button class="btn btn-primary" ui-sref="session.new">
                    <span class="glyphicon glyphicon-flash"></span> <span translate="swanApp.session.home.createLabel">Create a new Session</span>
                </button>
            </div>
        </div>
    </div>

    <div class="modal fade" id="deleteSessionConfirmation">
        <div class="modal-dialog">
            <div class="modal-content">
                <form name="deleteForm" ng-submit="confirmDelete(session.id)">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                                ng-click="clear()">&times;</button>
                        <h4 class="modal-title" translate="entity.delete.title">Confirm delete operation</h4>
                    </div>
                    <div class="modal-body">
                        <p translate="swanApp.session.delete.question" translate-values="{id: '{{session.id}}'}">Are you sure you want to delete this Session?</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="clear()">
                            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span translate="entity.action.cancel">Cancel</span>
                        </button>
                        <button type="submit" ng-disabled="deleteForm.$invalid" class="btn btn-danger">
                            <span class="glyphicon glyphicon-remove-circle"></span>&nbsp;<span translate="entity.action.delete">Delete</span>
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th translate="global.field.id">ID</th>
                    <th translate="swanApp.session.name">Name</th>
                    <th translate="swanApp.session.timeSlotStart">TimeSlotStart</th>
                    <th translate="swanApp.session.timeSlotEnd">TimeSlotEnd</th>
                    <th translate="swanApp.session.type">Type</th>
                    <th translate="swanApp.session.prerequisite">Prerequisite</th>
                    <th translate="swanApp.session.agenda">Agenda</th>
                    <th translate="swanApp.session.prepareList">PrepareList</th>
                    <th translate="swanApp.session.space">space</th>
                    <th translate="swanApp.session.event">event</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="session in sessions">
                    <td><a ui-sref="session.detail({id:session.id})">{{session.id}}</a></td>
                    <td>{{session.name}}</td>
                    <td>{{session.timeSlotStart}}</td>
                    <td>{{session.timeSlotEnd}}</td>
                    <td>{{session.type}}</td>
                    <td>{{session.prerequisite}}</td>
                    <td>{{session.agenda}}</td>
                    <td>{{session.prepareList}}</td>
                    <td>{{session.space.id}}</td>
                    <td>{{session.event.id}}</td>
                    <td>
                        <button type="submit"
                                ui-sref="session.detail({id:session.id})"
                                class="btn btn-info btn-sm">
                            <span class="glyphicon glyphicon-eye-open"></span>&nbsp;<span translate="entity.action.view"> View</span>
                        </button>
                        <button type="submit"
                                ui-sref="session.edit({id:session.id})"
                                class="btn btn-primary btn-sm">
                            <span class="glyphicon glyphicon-pencil"></span>&nbsp;<span translate="entity.action.edit"> Edit</span>
                        </button>
                        <button type="submit"
                                ng-click="delete(session.id)"
                                class="btn btn-danger btn-sm">
                            <span class="glyphicon glyphicon-remove-circle"></span>&nbsp;<span translate="entity.action.delete"> Delete</span>
                        </button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
